package org.microdream.easy.deploy.supplier;

import org.microdream.easy.deploy.po.CachePo;
import org.microdream.easy.deploy.service.DDictionaryService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Order(value = 1)
public class DictionarySupplier implements CommandLineRunner {

    @Resource
    private DDictionaryService dDictionaryService;

    @Override
    public void run(String... args) throws Exception {
        CachePo.dictionaryListMap = dDictionaryService.initListMap();
        CachePo.dictionarySingleMap = dDictionaryService.initSingleMap();
    }
}
